<!DOCTYPE html>
<html>

	<head>
		<title>个人中心</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
		<link rel="stylesheet" href="../lib/weui.min.css">
		<link rel="stylesheet" href="../css/jquery-weui.css">
		<link rel="stylesheet" type="text/css" href="css/mine.css" />
		<style type="text/css">
			.mayue-tuichu {
				width: 100%;
				height: 50px;
				background-color: #04BE02;
				color: white;
				text-align: center;
				line-height: 50px;
				font-size: 18px;
				border-radius: 10px;
			}
			
			.mayue-tuichu:hover {
				background-color: #008000;
				
			}
		</style>
	</head>

	<body ontouchstart>
		<div class="weui-tab">
			<div class="weui-tab__bd">
				<div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
					<div id="content">
						<div id="wu_zhifu">
							<div id="huantouxiang">
								<p>
									<a href="../login/index.html" style="color: white;" v-html="pleaselogin"></a>
									<a href="javascript:;" style="color: white;" v-html="mayuelogin"></a>
								</p>
								<p style="color: white;"></p>
								<p>普通会员 可用积分0</p>
							</div>
							<input type="button" v-on:click="qiandao1" v-bind:value="qiandao"/>
						</div>
						<!--4个选项卡-->
						<div class="weui-flex">
							<div class="weui-flex__item">
								<div class="placeholder">
									<a href="#">
										<p style="color: orange;"><b>0.00</b>元</p>
										<p class="color">余额</p>
									</a>
								</div>
							</div>
							<div class="weui-flex__item">
								<div class="placeholder">
									<a href="#">
										<p style="color: red;"><b>0</b>个</p>
										<p class="color">优惠</p>
									</a>
								</div>
							</div>
							<div class="weui-flex__item">
								<div class="placeholder">
									<a href="#">
										<p style="color: greenyellow;"><b>0</b>分</p>
										<p class="color">积分</p>
									</a>
								</div>
							</div>
						</div>
						<!--带图文的图标组合!-->
						<div class="weui-panel">
							<div class="weui-panel__bd">
								<div class="weui-media-box weui-media-box_small-appmsg">
									<div class="weui-cells">
										<a class="weui-cell weui-cell_access" href="../adress/adress.html">
											<div class="weui-cell__hd"><img src="../images/cz.png" alt="" style="width:30px;margin-right:5px;display:block"></div>
											<div class="weui-cell__bd weui-cell_primary">
												<p>收货地址</p>
											</div>
											<span class="weui-cell__ft"></span>
										</a>
										<a class="weui-cell weui-cell_access" href="javascript:;">
											<div class="weui-cell__hd"><img src="img/icon_concern.png" alt="" style="width:30px;margin-right:5px;display:block"></div>
											<div class="weui-cell__bd weui-cell_primary">
												<p>我的收藏</p>
											</div>
											<span class="weui-cell__ft"></span>
										</a>
									</div>
								</div>
							</div>
						</div>
						<div class="weui-panel">
							<div class="weui-panel__bd">
								<div class="weui-media-box weui-media-box_small-appmsg">
									<div class="weui-cells">
										<a class="weui-cell weui-cell_access" href="javascript:;">
											<div class="weui-cell__hd"><img src="img/icon_integral.png" alt="" style="width:30px;margin-right:5px;display:block"></div>
											<div class="weui-cell__bd weui-cell_primary">
												<p>积分商城</p>
											</div>
											<span class="weui-cell__ft"></span>
										</a>
										<a class="weui-cell weui-cell_access" href="javascript:;">
											<div class="weui-cell__hd"><img src="img/icon_goods.png" alt="" style="width:30px;margin-right:5px;display:block"></div>
											<div class="weui-cell__bd weui-cell_primary">
												<p>玩游戏领红包</p>
											</div>
											<span class="weui-cell__ft"></span>
										</a>
									</div>
								</div>
							</div>
						</div>
						<div class="weui-panel">
							<div class="weui-panel__bd">
								<div class="weui-media-box weui-media-box_small-appmsg">
									<div class="weui-cells">
										<a class="weui-cell weui-cell_access" href="javascript:;">
											<div class="weui-cell__hd"><img src="img/icon_logistics.png" alt="" style="width:30px;margin-right:5px;display:block"></div>
											<div class="weui-cell__bd weui-cell_primary">
												<p>服务中心</p>
											</div>
											<span class="weui-cell__ft"></span>
										</a>
										<a class="weui-cell weui-cell_access" href="javascript:;">
											<div class="weui-cell__hd"><img src="img/icon_coupon.png" alt="" style="width:30px;margin-right:5px;display:block"></div>
											<div class="weui-cell__bd weui-cell_primary">
												<p>欢迎评分</p>
											</div>
											<span class="weui-cell__ft"></span>
										</a>
										<a class="weui-cell weui-cell_access" href="javascript:;">
											<div class="weui-cell__hd"><img src="img/icon_brand_weibo.png" alt="" style="width:30px;margin-right:5px;display:block"></div>
											<div class="weui-cell__bd weui-cell_primary">
												<p>加盟合作</p>
											</div>
											<span class="weui-cell__ft"></span>
										</a>
										<p class="mayue-tuichu" @click="logout">退出登录</p>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="weui-tabbar">
				<a href="../index/index.html" class="weui-tabbar__item weui-bar__item--on">
					<div class="weui-tabbar__icon">
						<img src="../images/icon_nav_button.png" alt="">
					</div>
					<p class="weui-tabbar__label">外卖</p>
				</a>
				<a href="../find/find.html" class="weui-tabbar__item">
					<div class="weui-tabbar__icon">
						<img src="../images/icon_nav_msg.png" alt="">
					</div>
					<p class="weui-tabbar__label">发现</p>
				</a>
				<a href="../mymenu/mymenu.html" class="weui-tabbar__item">
					<div class="weui-tabbar__icon">
						<img src="../images/icon_nav_article.png" alt="">
					</div>
					<p class="weui-tabbar__label">订单</p>
				</a>
				<a href="../mine/mine.html" class="weui-tabbar__item">
					<div class="weui-tabbar__icon">
						<img src="../images/icon_nav_cell.png" alt="">
					</div>
					<p class="weui-tabbar__label">我的</p>
				</a>
			</div>
		</div>
		<script src="../lib/jquery-2.1.4.js"></script>
		<script src="../js/jquery-weui.min.js"></script>
		<script src="../js/vue.js" type="text/javascript"></script>
		<script src="../js/av-min-2.1.2.js" type="text/javascript"></script>
		<script type="text/javascript">
			var newnue = new Vue({
				el: "body",
				data: {
					mayuelogin: "",
					pleaselogin: "",
					type: false,
					qiandao:"签到",
				},
				created: function() {
					var APP_ID = '9etyUbhi95RBWTaoLBTyW5HP-gzGzoHsz';
					var APP_KEY = '6IkehXVEvUELlpo1SAf1c8PR';
					AV.init({
						appId: APP_ID,
						appKey: APP_KEY
					});
					var currentUser = AV.User.current();
					//判断用户是否登录
					if(currentUser) {
						//若登录跳到商家订单页面
						console.log("该用户已登录");
						var currentUser = AV.User.current().attributes.username;
						console.log(currentUser);
						this.mayuelogin = "欢迎" + currentUser + "来到个人中心";
					} else {
						//若没有就跳到登录注册页面
						console.log("该用户没有登录");
						this.pleaselogin = "请移步登录界面"
					}
				},
				methods: {
					logout: function() {
						//退出后回清空密码数据，并且会调到登录界面
						AV.User.logOut();
						// 现在的 currentUser 是 null 了
						var currentUser = AV.User.current();
						location.href = "../login/index.html";
					},
					qiandao1:function  () {
						if (newnue.qiandao=="签到") {
							newnue.qiandao = "已签到";
						}
					},
				}

			});
		</script>

	</body>

</html>